extends State



@onready var interval_timer: Timer = $IntervalTimer

var _enemy: Enemy


func _ready() -> void:
    _enemy = _root.target

    interval_timer.timeout.connect(
        func() -> void:
            _enemy.damage_sender.disabled = false
    )

    await _enemy.ready
    _enemy.handle_damage_signals.send_damage_applied.connect(
        func(_info: DamageInfo) -> void:
            interval_timer.start()
            _enemy.damage_sender.disabled = true
    )


func _enter() -> void: pass
func _exit() -> void: pass


func _update(_delta: float) -> void: pass


func _fixed_update(_delta: float) -> void: pass
func _input(_event: InputEvent) -> void: pass
